from pydantic import BaseModel

class CompleteOrEscalate(BaseModel):
    """用于将当前任务标记为已完成和/或将对话框控制升级到主助手的工具，
        这个类可以根据用户的需要重新路由对话框。"""


    cancel: bool = True
    reason: str

    class Config:
        json_schema_extra = {
            "example": {
                "cancel": True,
                "reason": "User changed their mind about the current task.",
            },
            "example 2": {
                "cancel": True,
                "reason": "I have fully completed the task.",
            },
            "example 3": {
                "cancel": False,
                "reason": "I need to search the user's emails or calendar for more information.",
            },
        }
